<template>
	<view class="wrap">
		<scroll-view class="scroll-list msg-list-item" scroll-y="true">
			<view v-for=" row in model.rows "  :key="row.noticeId">
			<u-card title="医院动态"   padding="20" margin="0rpx 20rpx" thumb="/static/aidex/images/list-icon.png" @click="navTo('/pages/sys/msg/form',row.noticeId)">
				<view  slot="body">
					<view class="u-body-item u-flex u-col-between u-p-t-0">
						<view class="u-body-item-title u-line-2">{{row.noticeTitle}}</view>
					</view>
				</view>
				<view class="msg-time" >{{row.createTime}}</view>
			</u-card>
		</view>
			<u-divider>已经到底了</u-divider>
		</scroll-view>
	</view>
</template>
<script>
/**
 * Copyright (c) 2013-Now http://aidex.vip All rights reserved.
 */
export default {
	data() {
	return {
		model: {
			rows: []
		}
	};
	},
	onLoad() {
		this.$u.api.getNoticeList({
			noticeType:'1'
		}).then(res => {
			  //  console.log(res);
			if (res.code == '200'){
					
				this.model={
					rows : res.rows
				};
				console.log(this.model);
			
			}else{
				this.$u.toast("请登录后重试");
			}
		});
	},
	methods: {
	navTo(url,noticeId) {
		uni.navigateTo({
			url: url+"?noticeId="+noticeId
		});
	},
		search(value) {
			this.$u.toast('搜索内容为：' + value)
		}
		
	}
};

</script>
<style lang="scss">
@import '../../../common/uni.css';
page {
	background-color: #f5f5f5;
}
.wrap .search{
	background: #ffffff;
}
.msg-time{
	font-size: 26rpx;
	padding: 10px 0;
	color: #999999;
	text-align: center;
}
.u-card__foot{
	.u-icon{
		margin-right: 10px;
	}
}


</style>
